//大部分页面的父类

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

abstract class Page_Parent extends StatelessWidget {
  Page_Parent({super.key});
  int sideNaviFlex=50;
  int contentFlex=150;

 //派生类重写body
  Widget content();
  @override
  Widget build(BuildContext context) { 
   //共用的appBar
  var appBar=AppBar(
    
  );
  //导航栏
  Widget sideNavi=Container(

  );
  //scaffold所需body内容，其中左侧导航栏是写死在这里的
  var body=Container(
    child:Row(children: [
      const Spacer(),
      //左侧导航栏
      Expanded(child: sideNavi,flex: sideNaviFlex,),
      const Spacer(),
      Expanded(child: content(),flex: contentFlex,),
      const Spacer()
      //右侧是派生类的content
    ],)
  );

    return Scaffold(
      appBar: appBar,
      body: body,
    );
  }
}